import request from "@/utils/request"
import { type Speak, type Upspeak } from "@/types/Speak"

enum API {
    Rase_url = "/speak"
}
export const Add_speak = (data: Speak) => request({
    method: "post",
    url: API.Rase_url,
    data
})
export const get_list = (id: number) => request({
    method: "get",
    url: API.Rase_url + `/${id}`
})
export const put_one = (data: Upspeak) => request({
    method: "put",
    url: API.Rase_url,
    data
})
export const delete_one = (id: string) => request({
    method: "delete",
    url: API.Rase_url + `/${id}`
})